<html xmlns:py="http://genshi.edgewall.org/"
      xmlns:xi="http://www.w3.org/2001/XInclude"
      py:strip="">
<py:def function="display_news(news,show_more=False)">
 <div id="getting_started" style="width: 90%;margin: 0 auto;" >
  <span py:if="g.p.has_permission('news_new')" style="width: 16px;height: 16px"><a style="display:inline;text-decoration: none;" class=".ui-state-hover ui-icon ui-icon-plus" title="New" href="/news/new">&nbsp;&nbsp;&nbsp;&nbsp;</a></span>
  <div class="newsitem" py:for="newsitem in news">
  <h1><a href="/">${newsitem.title}</a></h1>
  	<span class="author">Author: <a href="#" >${newsitem.author.display_name}</a></span> <span class="date">Created: ${newsitem.date}</span>
  	<span py:if="g.p.has_permission('news_edit')" style="width: 16px;height: 16px"><a style="display:inline;text-decoration: none;" class=".ui-state-hover ui-icon ui-icon-pencil" title="Edit" href="/news/${newsitem.id}/edit">&nbsp;&nbsp;&nbsp;&nbsp;</a></span>
  	<form py:if="g.p.has_permission('news_delete')" style="display:inline;text-decoration: none;"  action="/news/${newsitem.id}" method="post">
		<input type="hidden" value="DELETE" name="_method"/>
		<input  type="submit" style="display:inline;border: none;" class=".ui-state-hover ui-corner-all ui-icon ui-icon-trash"  value="delete" onclick="return confirm('Are you sure you want to delete?');"/>
	</form>
  	<div class="content" >${XML(newsitem.div_short_text())}</div>
    <a py:if="newsitem.text and not show_more" class="more" href="#">more ...</a>
    <div py:if="newsitem.text and show_more" class="content_all" >${XML(newsitem.div_text())}</div>
    </div>
  </div>
</py:def>
</html>